<template>
  <div class="app-track-list">
    <TrackTabListItem
      v-for="item in list"
      :key="item.username"
      class="app-track-list-item"
      :item="item"
    />
  </div>
</template>

<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
import { DeepPartial } from 'ts-essentials'
import { Track } from '@/api/resources'
import TrackTabListItem from './TrackTabListItem.vue'

@Component({
  name: 'TrackTabList',
  components: {
    TrackTabListItem
  }
})
export default class extends Vue {
  @Prop() readonly list!: DeepPartial<Track>[]
}
</script>

<style lang="less" scoped>
.app-track-list {
  display: flex;
  flex-flow: row wrap;
  align-content: flex-start;
  .app-track-list-item {
    margin: 16px;
    &:hover {
      box-shadow: 1px 2px 2px 2px rgba(0, 0, 0, 0.2);
    }
  }
}
</style>
